<template>
	<div>
		<div class="shop-items">
			<div v-for="item in allData" class="onlyImg">
					<div class="onlyImg2">
						<span class="cpimg"><img :src="item.imgUrl" /></span>
						<div class="sp-info">
							<i>今日</i>
							<span v-text="item.title" class="name"></span>
							<div class="money">
								<span v-text="'￥'+item.newPrice" class="pic"></span>
							</div>
							<div class="clearfix">
								<span class="yuan">原价：</span>
								<span v-text="'￥'+item.oldPrice" class="oldpic"></span>
								<span v-text="item.saleCount+'人已买'" class="count-sale"></span>
							</div>
						</div>
					</div>
			</div>
		</div>
	</div>
</template>
<script>
	export default {
		data (){
  			return {
  				allData:[]
  			}
  		},

  		created (){
			this.$http.get('./static/99-boy.json')
			.then(data => {
				var result = data.body.data.groupList[1];
				this.allData = result.dataList;
				console.log(this.allData);
				console.log(data.body.data.groupList[1]);
			},err => {
				console.log(err);
			})
		}
	}
</script>
<style>
.shop-items{
	width:100%;
}
.shop-items>.onlyImg{
	width:94%;
	height:120px;
	padding:10px;
}
.onlyImg2{
	width:94%;
	height:120px;
	display:flex;
	color:#444;
	justify-content: space-around;
	border-bottom: solid 1px #f7f7f7;
}
.onlyImg2>.cpimg{
	width:120px;
	height:120px;
}
.onlyImg2>.cpimg>img{
	width:120px;
	height: 120px;
}
.onlyImg2>.sp-info{
	width:54%;
	height: 114px;
	padding-top: 10px;
	margin-left: 10px;
}
.onlyImg2>.sp-info>i{
	width:24px;
	height: 18px;
    line-height: 18px;
    margin-right: 3px;
    font-size: 12px;
    display: inline-block;
    border: solid 1px #f99;
    border-radius: 3px;
    color: #f99;
    padding: 0 3px;

}
.onlyImg2>.sp-info>.name{
	color:#444;
	height: 40px;
    line-height: 20px;
    overflow: hidden;
    font-size:14px;
    width:162px;
    font-weight: 400;
}
.onlyImg2>.sp-info>.money{
	height: 14px;
	margin-top:24px;
}
.onlyImg2>.sp-info>.money>.pic{
	font-size: 1.6rem;
    padding-right: 2px;
    color: #df3130;
    font-weight: 400;
}
.onlyImg2>.sp-info>.clearfix{
	height: 24px;
	color: #b0b0b0;
    line-height: 24px;
    margin-top: 13px;
}
.onlyImg2>.sp-info>.clearfix>.yuan{
	font-size:1.1rem;
}
.onlyImg2>.sp-info>.clearfix>.oldpic{
	text-decoration: line-through;
	font-size: 1.0rem;
}
.onlyImg2>.sp-info>.clearfix>.count-sale{
	font-size: 1.1rem;
	float: right;
}

</style>
